/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import java.util.List;
import javax.persistence.*;
import play.db.jpa.Model;

/**
 *
 * @author Dsi
 */
@Entity
public class State extends Model {
    public String name;
    public Boolean status;
    @ManyToOne
    public Country country;
    @OneToMany(mappedBy = "state")
    public List<City> cities;
//    Collection<City> cities;
    
    public State() {
    }

    public State(String name, Boolean status, Country country, List<City> cities) {
        this.name = name;
        this.status = status;
        this.country = country;
        this.cities = cities;
    }

}
